/*
 
 */
package com.jme3.gde.gui.extra.xam.model.impl;

import com.jme3.gde.gui.extra.xam.model.NiftyAttribute;
import java.util.List;
import org.w3c.dom.Element;
import com.jme3.gde.gui.extra.xam.model.EffectsType;
import com.jme3.gde.gui.extra.xam.model.NiftyModel;
import com.jme3.gde.gui.extra.xam.model.NiftyQName;
import com.jme3.gde.gui.extra.xam.model.SingleEffectType;
import com.jme3.gde.gui.extra.xam.model.spi.NiftyComponentBase;
import com.jme3.gde.gui.extra.xam.model.visitor.NiftyComponentVisitor;	

/**
 * Implementation for domain component effectsType.
 * 
 * @author cuongnguyen
 */
// Generated by XAM AutoGen Tool v0.2
public class EffectsTypeImpl extends NiftyComponentBase implements EffectsType {

    public EffectsTypeImpl(NiftyModel model, Element element) {
        super(model, element);
    }
    
    public EffectsTypeImpl(NiftyModel model) {
        this(model, createElementNS(model, NiftyQName.EFFECTSTYPE));
    }

    // attributes

    public boolean isOverlay() {
        return Boolean.parseBoolean(getAttribute(NiftyAttribute.OVERLAY));
    }

    public void setOverlay(boolean overlay) {
        setAttribute(OVERLAY_PROPERTY, NiftyAttribute.OVERLAY, overlay);
    }

    // child elements

    public List<SingleEffectType> getSingleEffectTypes() {
        return getChildren(SingleEffectType.class);
    }

    public void addSingleEffectType(SingleEffectType singleEffectType) {
        appendChild(SINGLEEFFECTTYPE_PROPERTY, singleEffectType);
    }

    public void removeSingleEffectType(SingleEffectType singleEffectType) {
        removeChild(SINGLEEFFECTTYPE_PROPERTY, singleEffectType);
    }

    public void accept(NiftyComponentVisitor visitor) {
        visitor.visit(this);
    }

}